package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class AddColumnDefinition implements AlterTableAction {

    private final int beginIndex;
    private final int endIndex;
    private final ColumnDefinition columnDefinition;

    public AddColumnDefinition(int beginIndex, ColumnDefinition columnDefinition) {
        this.beginIndex = beginIndex;
        this.endIndex = columnDefinition.getEndIndex();
        this.columnDefinition = columnDefinition;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public ColumnDefinition getColumnDefinition() {
        return columnDefinition;
    }

}
